package actionHandlers;

/*
 * Action Handler for Redo functionality:
 * pops item off stack and puts it back
 * on the shapes array list and repaints.
 */
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
//import java.util.List;
import palette.CanvasManager;
import palette.CanvasWindow;
import undoRedo.UndoRedo;
//import cuShapes.PQShape;
//import cuShapes.Connectable;

/*
 * @author: Daniel Miller
 */

public class RedoHandler implements ActionListener{

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		//List<PQShape> List = ((CanvasWindow)CanvasManager.getInst().getSelectedFrame()).getCanvas().getShapeList();
		UndoRedo redoStack = UndoRedo.getInst();
		if(redoStack.getSize() > 0)
		{
			//Object item = redoStack.pop();
			//List.add(List.size(),(PQShape) item);    //JD 4.8.10
			//System.out.println(List.get(List.size()));
		}
		((CanvasWindow)CanvasManager.getInst().getSelectedFrame()).getCanvas().repaint();
	}
	
}
